<!--
 * @Author: your name
 * @Date: 2023-10-03 14:28:08
 * @LastEditTime: 2023-10-03 14:42:11
 * @LastEditors: DESKTOP-536UVPC
 * @Description: In User Settings Edit
 * @FilePath: \css-special-effects\发光的球.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>发光的球</title>
</head>

<body>
    <div class="light"></div>
</body>
<style>
    body {
        /* min-height: 100vh; */
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .light {
        width: 100px;
        height: 100px;
        /* border: 1px solid #000; */
        border-radius: 50%;
        /* 执行动画 */
        animation: light 2s ease-in-out infinite alternate;
    }
    /* 定义动画 */
    @keyframes light {
        from {
            box-shadow: 0px 0px 5px rgb(43, 26, 167);
        }

        to {
            box-shadow: 0px 0px 20px rgb(200, 36, 134);
        }
    }

</style>

</html>